package main

import (
	"flag"
	"fmt"
)

func main() {

	var (
		name string
		age  int
	)
	//flag 从控制台读取 a=b 类似这种的参数
	//name:=flag.String("name","huanglu","的名字")
	//age:=flag.Int("age",10,"年龄")
	//married:=flag.Bool("married",true,"结婚了吗")
	//cTime:=flag.Duration("ct",time.Second,"多久了")

	flag.StringVar(&name, "name", "huanglu", "你的名字")
	flag.IntVar(&age, "age", 30, "你的年龄")
	flag.Parse()
	fmt.Println(name)
}
